package com.hunau.novel_reading.common;

import org.springframework.validation.BindingResult;

/**
 * @author hb
 * @date 2025-06-18 17:06:33
 */
public class BindingResultParseMessage {
    public static String parseDefaultMessage(BindingResult bindResult) {
        StringBuilder sb = new StringBuilder();
        bindResult.getFieldErrors().forEach(fieldError -> {
            sb.append(fieldError.getDefaultMessage()).append(";");
        });
        return sb.toString();
    }
}
